package com.ruoyi.common.enums;

import java.util.List;

/**
 * 统一视频解析响应数据
 * 支持B站、抖音、快手等平台的视频解析
 * @Author: JH-Ahua
 * @CreateTime: 2025/1/15
 */
public class VideoParseResponse {
    
    private Integer code;
    private String msg;
    private VideoData data;
    
    public VideoParseResponse() {}
    
    public VideoParseResponse(Integer code, String msg, VideoData data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
    
    public Integer getCode() {
        return code;
    }
    
    public void setCode(Integer code) {
        this.code = code;
    }
    
    public String getMsg() {
        return msg;
    }
    
    public void setMsg(String msg) {
        this.msg = msg;
    }
    
    public VideoData getData() {
        return data;
    }
    
    public void setData(VideoData data) {
        this.data = data;
    }
    
    /**
     * 视频数据
     */
    public static class VideoData {
        private String author;
        private String uid;
        private String avatar;
        private Long like;
        private Long time;
        private String title;
        private String cover;
        private Object images; // 可能是字符串或List<String>
        private String url;
        private Object music; // 可能是字符串或Music对象
        private String description;
        
        // B站特有字段
        private List<Video> videos;
        private Integer totalVideos;
        
        // 快手特有字段
        private Integer api;
        
        public VideoData() {}
        
        public String getAuthor() {
            return author;
        }
        
        public void setAuthor(String author) {
            this.author = author;
        }
        
        public String getUid() {
            return uid;
        }
        
        public void setUid(String uid) {
            this.uid = uid;
        }
        
        public String getAvatar() {
            return avatar;
        }
        
        public void setAvatar(String avatar) {
            this.avatar = avatar;
        }
        
        public Long getLike() {
            return like;
        }
        
        public void setLike(Long like) {
            this.like = like;
        }
        
        public Long getTime() {
            return time;
        }
        
        public void setTime(Long time) {
            this.time = time;
        }
        
        public String getTitle() {
            return title;
        }
        
        public void setTitle(String title) {
            this.title = title;
        }
        
        public String getCover() {
            return cover;
        }
        
        public void setCover(String cover) {
            this.cover = cover;
        }
        
        public Object getImages() {
            return images;
        }
        
        public void setImages(Object images) {
            this.images = images;
        }
        
        public String getUrl() {
            return url;
        }
        
        public void setUrl(String url) {
            this.url = url;
        }
        
        public Object getMusic() {
            return music;
        }
        
        public void setMusic(Object music) {
            this.music = music;
        }
        
        public String getDescription() {
            return description;
        }
        
        public void setDescription(String description) {
            this.description = description;
        }
        
        public List<Video> getVideos() {
            return videos;
        }
        
        public void setVideos(List<Video> videos) {
            this.videos = videos;
        }
        
        public Integer getTotalVideos() {
            return totalVideos;
        }
        
        public void setTotalVideos(Integer totalVideos) {
            this.totalVideos = totalVideos;
        }
        
        public Integer getApi() {
            return api;
        }
        
        public void setApi(Integer api) {
            this.api = api;
        }
    }
    
    /**
     * 音乐信息
     */
    public static class Music {
        private String title;
        private String author;
        private String avatar;
        private String url;
        
        public Music() {}
        
        public Music(String title, String author, String avatar, String url) {
            this.title = title;
            this.author = author;
            this.avatar = avatar;
            this.url = url;
        }
        
        public String getTitle() {
            return title;
        }
        
        public void setTitle(String title) {
            this.title = title;
        }
        
        public String getAuthor() {
            return author;
        }
        
        public void setAuthor(String author) {
            this.author = author;
        }
        
        public String getAvatar() {
            return avatar;
        }
        
        public void setAvatar(String avatar) {
            this.avatar = avatar;
        }
        
        public String getUrl() {
            return url;
        }
        
        public void setUrl(String url) {
            this.url = url;
        }
    }
    
    /**
     * 视频信息（B站多P视频使用）
     */
    public static class Video {
        private String title;
        private Integer duration;
        private String durationFormat;
        private String url;
        private Integer index;
        private String error;
        
        public Video() {}
        
        public String getTitle() {
            return title;
        }
        
        public void setTitle(String title) {
            this.title = title;
        }
        
        public Integer getDuration() {
            return duration;
        }
        
        public void setDuration(Integer duration) {
            this.duration = duration;
        }
        
        public String getDurationFormat() {
            return durationFormat;
        }
        
        public void setDurationFormat(String durationFormat) {
            this.durationFormat = durationFormat;
        }
        
        public String getUrl() {
            return url;
        }
        
        public void setUrl(String url) {
            this.url = url;
        }
        
        public Integer getIndex() {
            return index;
        }
        
        public void setIndex(Integer index) {
            this.index = index;
        }
        
        public String getError() {
            return error;
        }
        
        public void setError(String error) {
            this.error = error;
        }
    }
}
